import VueRouter from 'vue-router'

import HomnContainer from './components/tabbar/HomeContainer.vue'
import MenberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContatiner.vue'
import NewsList from './components/news/NewsList.vue'
import Newslnfo from './components/news/Newslnfo.vue'
import PhotoList from './components/photos/PhotoList.vue'
import PhotoInfo from './components/photos/PhotoInfo.vue'
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/Goodsinfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'
import GoodsComment from './components/goods/GoodsComment.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
     { path: '/',redirect:'/home' },
     { path: '/home',component: HomnContainer},
     { path: '/member',component: MenberContainer},
     { path: '/shopcar',component: ShopcarContainer},
     { path: '/search',component: SearchContainer},
     { path: '/home/newslist',component: NewsList },
     { path: '/home/Newslnfo:id' ,component:Newslnfo},
     { path: '/home/PhotoList',component:PhotoList },
     { path: '/home/PhotoInfo:id',component:PhotoInfo },
     { path: '/home/goodsList',component: GoodsList },
     { path: '/home/goodsInfo:id',component: GoodsInfo },
     { path: '/home/goodsDesc:id',component: GoodsDesc, name:'goodsDesc'},
     { path: '/home/goodsComment:id',component: GoodsComment, name:'goodsComment'},

  ],
  linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去
export default router